package model

type Category struct {
	ID        uint   `json:"id" gorm:"primary_key"` // grom会自动把id做主键
	Name      string `json:"name" gorm:"type:varchar(50);not null;unique" binding:"required"`
	CreatedAt Time   `json:"created_at" gorm:"type:timestamp"` // gorm会自动更新CreatedAt字段
	UpdatedAt Time   `json:"updated_at" gorm:"type:timestamp"` // gorm会自动更新
}
